.class public Lcom/brixd/niceapp/animator/AnimatorUtils;
.super Ljava/lang/Object;
.source "AnimatorUtils.java"


# direct methods
.method public constructor <init>()V
    .registers 1

    .prologue
    .line 20
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static animViewFadeIn(Landroid/view/View;)Landroid/animation/Animator;
    .registers 4
    .param p0, "view"    # Landroid/view/View;

    .prologue
    .line 56
    const-wide/16 v0, 0xc8

    const/4 v2, 0x0

    invoke-static {p0, v0, v1, v2}, Lcom/brixd/niceapp/animator/AnimatorUtils;->animViewFadeIn(Landroid/view/View;JLandroid/animation/Animator$AnimatorListener;)Landroid/animation/Animator;

    move-result-object v0

    return-object v0
.end method

.method public static animViewFadeIn(Landroid/view/View;JLandroid/animation/Animator$AnimatorListener;)Landroid/animation/Animator;
    .registers 7
    .param p0, "view"    # Landroid/view/View;
    .param p1, "duration"    # J
    .param p3, "listener"    # Landroid/animation/Animator$AnimatorListener;

    .prologue
    .line 70
    const-string v1, "alpha"

    const/4 v2, 0x2

    new-array v2, v2, [F

    fill-array-data v2, :array_18

    invoke-static {p0, v1, v2}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Ljava/lang/String;[F)Landroid/animation/ObjectAnimator;

    move-result-object v0

    .line 71
    .local v0, "fadeAnimator":Landroid/animation/ValueAnimator;
    invoke-virtual {v0, p1, p2}, Landroid/animation/ValueAnimator;->setDuration(J)Landroid/animation/ValueAnimator;

    .line 72
    if-eqz p3, :cond_14

    .line 73
    invoke-virtual {v0, p3}, Landroid/animation/ValueAnimator;->addListener(Landroid/animation/Animator$AnimatorListener;)V

    .line 75
    :cond_14
    invoke-virtual {v0}, Landroid/animation/ValueAnimator;->start()V

    .line 76
    return-object v0

    .line 70
    :array_18
    .array-data 4
        0x0
        0x3f800000
    .end array-data
.end method

.method public static animViewFadeOut(Landroid/view/View;)Landroid/animation/Animator;
    .registers 4
    .param p0, "view"    # Landroid/view/View;

    .prologue
    .line 52
    const-wide/16 v0, 0xc8

    const/4 v2, 0x0

    invoke-static {p0, v0, v1, v2}, Lcom/brixd/niceapp/animator/AnimatorUtils;->animViewFadeOut(Landroid/view/View;JLandroid/animation/Animator$AnimatorListener;)Landroid/animation/Animator;

    move-result-object v0

    return-object v0
.end method

.method public static animViewFadeOut(Landroid/view/View;JLandroid/animation/Animator$AnimatorListener;)Landroid/animation/Animator;
    .registers 7
    .param p0, "view"    # Landroid/view/View;
    .param p1, "duration"    # J
    .param p3, "listener"    # Landroid/animation/Animator$AnimatorListener;

    .prologue
    .line 60
    const-string v1, "alpha"

    const/4 v2, 0x2

    new-array v2, v2, [F

    fill-array-data v2, :array_18

    invoke-static {p0, v1, v2}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Ljava/lang/String;[F)Landroid/animation/ObjectAnimator;

    move-result-object v0

    .line 61
    .local v0, "fadeAnimator":Landroid/animation/ValueAnimator;
    invoke-virtual {v0, p1, p2}, Landroid/animation/ValueAnimator;->setDuration(J)Landroid/animation/ValueAnimator;

    .line 62
    if-eqz p3, :cond_14

    .line 63
    invoke-virtual {v0, p3}, Landroid/animation/ValueAnimator;->addListener(Landroid/animation/Animator$AnimatorListener;)V

    .line 65
    :cond_14
    invoke-virtual {v0}, Landroid/animation/ValueAnimator;->start()V

    .line 66
    return-object v0

    .line 60
    :array_18
    .array-data 4
        0x3f800000
        0x0
    .end array-data
.end method

.method public static animateHeartbeat(Landroid/view/View;)V
    .registers 7
    .param p0, "view"    # Landroid/view/View;

    .prologue
    const/4 v4, 0x2

    .line 104
    new-array v3, v4, [F

    fill-array-data v3, :array_48

    invoke-static {v3}, Landroid/animation/ValueAnimator;->ofFloat([F)Landroid/animation/ValueAnimator;

    move-result-object v1

    .line 105
    .local v1, "scaleBigger":Landroid/animation/ValueAnimator;
    new-instance v3, Landroid/view/animation/OvershootInterpolator;

    invoke-direct {v3}, Landroid/view/animation/OvershootInterpolator;-><init>()V

    invoke-virtual {v1, v3}, Landroid/animation/ValueAnimator;->setInterpolator(Landroid/animation/TimeInterpolator;)V

    .line 106
    new-instance v3, Lcom/brixd/niceapp/animator/AnimatorUtils$1;

    invoke-direct {v3, p0}, Lcom/brixd/niceapp/animator/AnimatorUtils$1;-><init>(Landroid/view/View;)V

    invoke-virtual {v1, v3}, Landroid/animation/ValueAnimator;->addUpdateListener(Landroid/animation/ValueAnimator$AnimatorUpdateListener;)V

    .line 116
    new-array v3, v4, [F

    fill-array-data v3, :array_50

    invoke-static {v3}, Landroid/animation/ValueAnimator;->ofFloat([F)Landroid/animation/ValueAnimator;

    move-result-object v2

    .line 117
    .local v2, "scaleSmaller":Landroid/animation/ValueAnimator;
    new-instance v3, Landroid/view/animation/DecelerateInterpolator;

    invoke-direct {v3}, Landroid/view/animation/DecelerateInterpolator;-><init>()V

    invoke-virtual {v2, v3}, Landroid/animation/ValueAnimator;->setInterpolator(Landroid/animation/TimeInterpolator;)V

    .line 118
    new-instance v3, Lcom/brixd/niceapp/animator/AnimatorUtils$2;

    invoke-direct {v3, p0}, Lcom/brixd/niceapp/animator/AnimatorUtils$2;-><init>(Landroid/view/View;)V

    invoke-virtual {v2, v3}, Landroid/animation/ValueAnimator;->addUpdateListener(Landroid/animation/ValueAnimator$AnimatorUpdateListener;)V

    .line 128
    new-instance v0, Landroid/animation/AnimatorSet;

    invoke-direct {v0}, Landroid/animation/AnimatorSet;-><init>()V

    .line 129
    .local v0, "animatorSet":Landroid/animation/AnimatorSet;
    invoke-virtual {v0, v2}, Landroid/animation/AnimatorSet;->play(Landroid/animation/Animator;)Landroid/animation/AnimatorSet$Builder;

    move-result-object v3

    invoke-virtual {v3, v1}, Landroid/animation/AnimatorSet$Builder;->after(Landroid/animation/Animator;)Landroid/animation/AnimatorSet$Builder;

    .line 130
    const-wide/16 v4, 0xc8

    invoke-virtual {v0, v4, v5}, Landroid/animation/AnimatorSet;->setDuration(J)Landroid/animation/AnimatorSet;

    .line 131
    invoke-virtual {v0}, Landroid/animation/AnimatorSet;->start()V

    .line 132
    return-void

    .line 104
    :array_48
    .array-data 4
        0x3f800000
        0x3fc00000
    .end array-data

    .line 116
    :array_50
    .array-data 4
        0x3fc00000
        0x3f800000
    .end array-data
.end method

.method public static animateShake(Landroid/view/View;)V
    .registers 9
    .param p0, "view"    # Landroid/view/View;

    .prologue
    const/4 v7, 0x2

    .line 135
    const-string v1, "Y"

    new-array v2, v7, [F

    const/4 v3, 0x0

    invoke-virtual {p0}, Landroid/view/View;->getY()F

    move-result v4

    aput v4, v2, v3

    const/4 v3, 0x1

    .line 136
    invoke-virtual {p0}, Landroid/view/View;->getY()F

    move-result v4

    invoke-virtual {p0}, Landroid/view/View;->getContext()Landroid/content/Context;

    move-result-object v5

    invoke-virtual {v5}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v6, 0x7f090084

    invoke-virtual {v5, v6}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v5

    int-to-float v5, v5

    add-float/2addr v4, v5

    aput v4, v2, v3

    .line 135
    invoke-static {p0, v1, v2}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Ljava/lang/String;[F)Landroid/animation/ObjectAnimator;

    move-result-object v0

    .line 137
    .local v0, "animator":Landroid/animation/ObjectAnimator;
    new-instance v1, Landroid/view/animation/AccelerateDecelerateInterpolator;

    invoke-direct {v1}, Landroid/view/animation/AccelerateDecelerateInterpolator;-><init>()V

    invoke-virtual {v0, v1}, Landroid/animation/ObjectAnimator;->setInterpolator(Landroid/animation/TimeInterpolator;)V

    .line 138
    invoke-virtual {v0, v7}, Landroid/animation/ObjectAnimator;->setRepeatMode(I)V

    .line 139
    const/4 v1, -0x1

    invoke-virtual {v0, v1}, Landroid/animation/ObjectAnimator;->setRepeatCount(I)V

    .line 140
    const-wide/16 v2, 0x1f4

    invoke-virtual {v0, v2, v3}, Landroid/animation/ObjectAnimator;->setDuration(J)Landroid/animation/ObjectAnimator;

    .line 141
    invoke-virtual {v0}, Landroid/animation/ObjectAnimator;->start()V

    .line 142
    return-void
.end method

.method public static cancelAnimation(Landroid/view/View;)V
    .registers 2
    .param p0, "view"    # Landroid/view/View;

    .prologue
    .line 96
    invoke-virtual {p0}, Landroid/view/View;->getAnimation()Landroid/view/animation/Animation;

    move-result-object v0

    .line 97
    .local v0, "animation":Landroid/view/animation/Animation;
    if-eqz v0, :cond_c

    .line 98
    invoke-virtual {v0}, Landroid/view/animation/Animation;->cancel()V

    .line 99
    invoke-virtual {p0}, Landroid/view/View;->clearAnimation()V

    .line 101
    :cond_c
    return-void
.end method

.method public static getIconScaleAnimation(FFFFFF)Landroid/view/animation/ScaleAnimation;
    .registers 13
    .param p0, "fromX"    # F
    .param p1, "toX"    # F
    .param p2, "fromY"    # F
    .param p3, "toY"    # F
    .param p4, "pivotX"    # F
    .param p5, "pivotY"    # F

    .prologue
    .line 88
    new-instance v0, Landroid/view/animation/ScaleAnimation;

    move v1, p0

    move v2, p1

    move v3, p2

    move v4, p3

    move v5, p4

    move v6, p5

    invoke-direct/range {v0 .. v6}, Landroid/view/animation/ScaleAnimation;-><init>(FFFFFF)V

    .line 89
    .local v0, "animation":Landroid/view/animation/ScaleAnimation;
    new-instance v1, Landroid/view/animation/DecelerateInterpolator;

    invoke-direct {v1}, Landroid/view/animation/DecelerateInterpolator;-><init>()V

    invoke-virtual {v0, v1}, Landroid/view/animation/ScaleAnimation;->setInterpolator(Landroid/view/animation/Interpolator;)V

    .line 90
    const-wide/16 v2, 0xc8

    invoke-virtual {v0, v2, v3}, Landroid/view/animation/ScaleAnimation;->setDuration(J)V

    .line 92
    return-object v0
.end method

.method public static getIconTranslateAnimation(FFFF)Landroid/view/animation/TranslateAnimation;
    .registers 8
    .param p0, "fromXDelta"    # F
    .param p1, "toXDelta"    # F
    .param p2, "fromYDelta"    # F
    .param p3, "toYDelta"    # F

    .prologue
    .line 80
    new-instance v0, Landroid/view/animation/TranslateAnimation;

    invoke-direct {v0, p0, p1, p2, p3}, Landroid/view/animation/TranslateAnimation;-><init>(FFFF)V

    .line 81
    .local v0, "animation":Landroid/view/animation/TranslateAnimation;
    new-instance v1, Landroid/view/animation/DecelerateInterpolator;

    invoke-direct {v1}, Landroid/view/animation/DecelerateInterpolator;-><init>()V

    invoke-virtual {v0, v1}, Landroid/view/animation/TranslateAnimation;->setInterpolator(Landroid/view/animation/Interpolator;)V

    .line 82
    const-wide/16 v2, 0xc8

    invoke-virtual {v0, v2, v3}, Landroid/view/animation/TranslateAnimation;->setDuration(J)V

    .line 84
    return-object v0
.end method

.method public static moveScrollViewToX(Landroid/view/View;IIIZ)Landroid/animation/Animator;
    .registers 9
    .param p0, "view"    # Landroid/view/View;
    .param p1, "x"    # I
    .param p2, "duration"    # I
    .param p3, "startDelay"    # I
    .param p4, "shouldStart"    # Z

    .prologue
    .line 41
    const-string v1, "scrollX"

    const/4 v2, 0x1

    new-array v2, v2, [I

    const/4 v3, 0x0

    aput p1, v2, v3

    invoke-static {p0, v1, v2}, Landroid/animation/ObjectAnimator;->ofInt(Ljava/lang/Object;Ljava/lang/String;[I)Landroid/animation/ObjectAnimator;

    move-result-object v0

    .line 42
    .local v0, "objectAnimator":Landroid/animation/ObjectAnimator;
    int-to-long v2, p2

    invoke-virtual {v0, v2, v3}, Landroid/animation/ObjectAnimator;->setDuration(J)Landroid/animation/ObjectAnimator;

    .line 43
    new-instance v1, Landroid/view/animation/AccelerateDecelerateInterpolator;

    invoke-direct {v1}, Landroid/view/animation/AccelerateDecelerateInterpolator;-><init>()V

    invoke-virtual {v0, v1}, Landroid/animation/ObjectAnimator;->setInterpolator(Landroid/animation/TimeInterpolator;)V

    .line 44
    int-to-long v2, p3

    invoke-virtual {v0, v2, v3}, Landroid/animation/ObjectAnimator;->setStartDelay(J)V

    .line 45
    if-eqz p4, :cond_21

    .line 46
    invoke-virtual {v0}, Landroid/animation/ObjectAnimator;->start()V

    .line 48
    :cond_21
    return-object v0
.end method

.method public static showBackgroundColorAnimation(Landroid/view/View;III)V
    .registers 8
    .param p0, "view"    # Landroid/view/View;
    .param p1, "preColor"    # I
    .param p2, "colorTo"    # I
    .param p3, "duration"    # I

    .prologue
    .line 34
    const-string v1, "backgroundColor"

    const/4 v2, 0x2

    new-array v2, v2, [I

    const/4 v3, 0x0

    aput p1, v2, v3

    const/4 v3, 0x1

    aput p2, v2, v3

    invoke-static {p0, v1, v2}, Landroid/animation/ObjectAnimator;->ofInt(Ljava/lang/Object;Ljava/lang/String;[I)Landroid/animation/ObjectAnimator;

    move-result-object v0

    .line 35
    .local v0, "colorAnim":Landroid/animation/ValueAnimator;
    int-to-long v2, p3

    invoke-virtual {v0, v2, v3}, Landroid/animation/ValueAnimator;->setDuration(J)Landroid/animation/ValueAnimator;

    .line 36
    new-instance v1, Landroid/animation/ArgbEvaluator;

    invoke-direct {v1}, Landroid/animation/ArgbEvaluator;-><init>()V

    invoke-virtual {v0, v1}, Landroid/animation/ValueAnimator;->setEvaluator(Landroid/animation/TypeEvaluator;)V

    .line 37
    invoke-virtual {v0}, Landroid/animation/ValueAnimator;->start()V

    .line 38
    return-void
.end method

.method public static showUpAndDownBounce(Landroid/view/View;IIZZ)Landroid/animation/Animator;
    .registers 10
    .param p0, "view"    # Landroid/view/View;
    .param p1, "translationY"    # I
    .param p2, "duration"    # I
    .param p3, "shouldStart"    # Z
    .param p4, "hasInterpolator"    # Z

    .prologue
    .line 23
    const-string v1, "translationY"

    const/4 v2, 0x1

    new-array v2, v2, [F

    const/4 v3, 0x0

    int-to-float v4, p1

    aput v4, v2, v3

    invoke-static {p0, v1, v2}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Ljava/lang/String;[F)Landroid/animation/ObjectAnimator;

    move-result-object v0

    .line 24
    .local v0, "objectAnimator":Landroid/animation/ObjectAnimator;
    if-eqz p4, :cond_17

    .line 25
    new-instance v1, Landroid/view/animation/OvershootInterpolator;

    invoke-direct {v1}, Landroid/view/animation/OvershootInterpolator;-><init>()V

    invoke-virtual {v0, v1}, Landroid/animation/ObjectAnimator;->setInterpolator(Landroid/animation/TimeInterpolator;)V

    .line 26
    :cond_17
    int-to-long v2, p2

    invoke-virtual {v0, v2, v3}, Landroid/animation/ObjectAnimator;->setDuration(J)Landroid/animation/ObjectAnimator;

    .line 27
    if-eqz p3, :cond_20

    .line 28
    invoke-virtual {v0}, Landroid/animation/ObjectAnimator;->start()V

    .line 30
    :cond_20
    return-object v0
.end method
